package com.cn.jx.manager.po;

import com.cn.jx.common.entity.BaseIdEntity;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * <p>UserRole 用户角色关系表POJO类 对应数据库表名 SYS_USER_ROLE
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseIdEntity <tt>BaseIdEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_USER_ROLE")
public class UserRole  extends BaseIdEntity {

	private static final long serialVersionUID = -2213208709137609563L;

	/** <p>用户编码<p>设置为{@link String String}类型*/
	@Column(name="user_id",length=64)
	private String userId;
	
	/** <p>角色编码<p>设置为{@link String String}类型*/
	@Column(name="role_id",length=64)
	private String roleId;


	/** <p>初始化创建类 @return */
	public static UserRole getInstance(){
		UserRole m=new UserRole();
		m.setId(getRandomId());
		return m;
	}
	
	/** <p>{@link String String}<p>getUserId()*/
	public String getUserId() {
		return userId;
	}
	/** <p>{@link String String}<p>getRoleId()*/
	public String getRoleId() {
		return roleId;
	}

	/** <p>setUserId({@link String userId})*/
	public void setUserId(String userId) {
		this.userId = userId;
	}
	/** <p>setRoleId({@link String roleId})*/
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	
}
